Skip to main content

createECS

Description

createECS

Request Method

POST

Request Path

/customer/ecs/create

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
periodBODYintegerNoNo sample value for this parameter.period
costBODYnumberNoNo sample value for this parameter.cost
imageIdBODYstringYesNo sample value for this parameter.ecs image id
quantityBODYintegerYesNo sample value for this parameter.quantity
bandwidthBODYintegerNoNo sample value for this parameter.bandwidth
publicIpAddressBODYbooleanYesNo sample value for this parameter.public ip address
vcpuBODYstringYesNo sample value for this parameter.instance vcpu
systemDiskBODYobjectYesNo sample value for this parameter.system disk
billingMethodBODYstringYesNo sample value for this parameter.billingMethod
instanceTypeBODYstringYesNo sample value for this parameter.instance type
instanceFamilyBODYstringYesNo sample value for this parameter.instance family name
osNameBODYstringYesNo sample value for this parameter.image osNameEn
deploymentSetIdBODYstringNoNo sample value for this parameter.deployment set id
platformBODYstringYesNo sample value for this parameter.image platform
securityGroupIdBODYstringYesNo sample value for this parameter.security group id
regionIdBODYstringYesNo sample value for this parameter.region id
vSwitchIdBODYstringYesNo sample value for this parameter.vSwitch id
serverGuardBODYbooleanYesNo sample value for this parameter.weather use serverGuard
vpcIdBODYstringYesNo sample value for this parameter.vpc id
pricingCycleBODYstringNoNo sample value for this parameter.pricing cycle
dataDiskBODYarrayNoNo sample value for this parameter.disk list
imageTypeBODYstringYesNo sample value for this parameter.image type
snapshotPolicyIdBODYstringYesNo sample value for this parameter.snapshot policy id

Return data

NameTypeSample valueDescription
resultobject`{"ecsCommonResponseVos":[{"instanceId":"d681268a-3489-4c61-a115-d1629e8edea7","orderId":2.0220727154128E+18}]}`result
resultCodestring0result code
resultMsgstringsuccessresult message

Example

Successful Response example

{
"result":
{
"ecsCommonResponseVos":
[
{
"instanceId":"d681268a-3489-4c61-a115-d1629e8edea7",
"orderId":2.0220727154128E+18
}

]

},
"resultCode":"0",
"resultMsg":"success"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}